<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template/LayoutPadrao.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                 xmlns="http://www.w3.org/1999/xhtml">

    <ui:define name="centro">
         <h:form id="frm1">
            <p:panelGrid columns="2">
                <f:facet name="header">Inscrever-se em Evento</f:facet>
                <p:outputLabel value="Num. Inscrição" for="numInscricao" style="font-size: 16px"/>
                <p:inputText value="#{inscreverEmEventoBean.numInscricao}" id="numInscricao"
                             required="true"/>
                
                <p:outputLabel value="Eventos Correntes" for="evento" style="font-size: 16px"/>
                <p:selectOneMenu value="#{inscreverEmEventoBean.eventoSelecionado}" id="evento"
                                 style="font-size: 16px" 
                                 required="true">
                    <f:selectItem itemLabel="Selecione" noSelectionOption="true"/>
                    <f:selectItems value="#{inscreverEmEventoBean.eventosAtivos}" var="evento" 
                                   itemLabel="#{evento.descricao}"
                                   itemValue="#{evento}"
                                   
                                   />
                </p:selectOneMenu>
                <f:facet name="footer">
                    <p:commandButton value="Salvar" action="#{inscreverEmEventoBean.salvar}"
                                     icon="ui-icon-check"
                                     update="frm1"
                                     ajax="false"/>  
                </f:facet>
                </p:panelGrid>
                <p:messages closable="true" id="msg"/>
        </h:form>
    </ui:define>

</ui:composition>
